from flask import Flask
import socket

#获取本机电脑名
my_name = socket.getfqdn(socket.gethostname())
#获取本机ip
my_address = socket.gethostbyname(my_name)
app = Flask(__name__)


@app.route('/')
def hello_world():
    return 'Hello World!'


if __name__ == '__main__':
    app.run(host=my_address, port=5001)
